import openpyxl
from openpyxl.workbook import Workbook
from openpyxl.worksheet.worksheet import Worksheet
f=r'F:\work\codings\python\pro_test\date\chenghechy.xlsx'

class Dof():
    def domyE(self,f,she,minr,maxr,minc,maxc):
        wk:Workbook=openpyxl.load_workbook(f)
        st:Worksheet=wk[she]
        s=st.iter_rows(minr,maxr,minc,maxc,values_only=True)
        l=[i for i in s]
        return l

if __name__ == '__main__':
    de=Dof()
    l=de.domyE(f,'chu',2,12,2,5)
    print(l)